package com.name.givename.result;


import com.name.givename.utils.Result;

/**
 * Created by yangtianrui
 */
public class ResultVoUtils {

    public static Result success(Object object)
    {
        Result resultVo = new Result();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setData(object);
        return resultVo;
    }

    public static Result success()
    {
        return success(null);
    }

    public static Result error(Integer code,String msg)
    {
        Result resultVo = new Result();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }

}
